package com.gdqy.FCS.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gdqy.FCS.dao.LikedDao;
import com.gdqy.FCS.entity.Liked;

@Service
@Transactional
public class LikedService {
	@Autowired
	private LikedDao likedDao;
	
	public List<Liked> selectByUser_id(int user_id){
		return likedDao.selectByUser_id(user_id);
	}
	
	public Liked selectByUser_idAndObject_idAndObject_type(int user_id,int object_id,String object_type){
		return likedDao.selectByUser_idAndObject_idAndObject_type(user_id, object_id, object_type);
	}
	public List<Liked> selectByUser_idAndObject_type(int user_id,String object_type){
		return likedDao.selectByUser_idAndObject_type(user_id, object_type);
	}
	public int insert(Liked liked){
		return likedDao.insert(liked);
	}
}
